package com.ddone.demo.controller;

import com.ddone.demo.bean.SuperMarketUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author ddone
 * @date 2024/3/22-13:18
 */
@Controller
@Slf4j
@RequestMapping("/super-market")
public class SuperMarketController {

    @PostMapping("/user/update")
    public String updateUser(SuperMarketUser user, Model model){
        model.addAttribute("user", user);
        return "user-update";
    }

}
